//
//  RealTimePlayerViewController.m
//  ReviewDemo
//
//  Created by 龙 on 2018/5/9.
//  Copyright © 2018年 long. All rights reserved.
//

#import "RealTimePlayerViewController.h"
#import "PlayerTableViewController.h"
#import "PlayerCollectionViewController.h"

@interface RealTimePlayerViewController ()

@end

@implementation RealTimePlayerViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.backgroundColor = [UIColor redColor];
    button.frame = CGRectMake(0, 0, 200, 35);
    button.center = self.view.center;
    [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [button setTitle:@"CollectionView" forState:UIControlStateNormal];
    [button addTarget:self action:@selector(collectionViewPlayerButtonClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
    
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
    button1.backgroundColor = [UIColor redColor];
    button1.frame = CGRectMake(0, 0, 200, 35);
    button1.center = CGPointMake(button.center.x, button.center.y + 100);
    [button1 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [button1 setTitle:@"tableView" forState:UIControlStateNormal];
    [button1 addTarget:self action:@selector(tableViewPlayerButtonClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button1];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - event response

- (void)collectionViewPlayerButtonClick
{
    PlayerCollectionViewController *playerVC = [[PlayerCollectionViewController alloc] init];
    [self.navigationController pushViewController:playerVC animated:YES];
}

- (void)tableViewPlayerButtonClick
{
    PlayerTableViewController *playerVC = [[PlayerTableViewController alloc] init];
    [self.navigationController pushViewController:playerVC animated:YES];
}


@end
